package customerEnter.Frame.JDBCDao.JdbcTemplate;

/**
 * 線程變量 保存數據源
 * 
 * 类名称：DynamicDataSourceHolder 类描述： 创建人：dy 创建时间：2016-8-23 下午2:12:36
 * 
 */

public class DynamicDataSourceHolder {

	private static final ThreadLocal<String>	THREAD_DATA_SOURCE	= new ThreadLocal<String>();

	public static String getDataSource() {
		return THREAD_DATA_SOURCE.get();
	}

	public static void setDataSource(String dataSource) {
		THREAD_DATA_SOURCE.set(dataSource);
	}

	public static void clearDataSource() {
		THREAD_DATA_SOURCE.remove();
	}
}
